package sudroid;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class ObjectUtil
{
  public static <T> T invokeCloneMethod(T paramT)
    throws Exception
  {
    Class localClass = paramT.getClass();
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("clone", arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    return localMethod.invoke(paramT, arrayOfObject);
  }

  public static boolean objectEquals(Object paramObject1, Object paramObject2)
  {
    int i;
    if (paramObject2 == null)
      i = 0;
    while (true)
    {
      return i;
      if (paramObject2 == paramObject1)
      {
        i = 1;
        continue;
      }
      Class localClass = paramObject1.getClass();
      if (paramObject2.getClass() != localClass)
      {
        i = 0;
        continue;
      }
      Field[] arrayOfField = localClass.getDeclaredFields();
      try
      {
        i = arrayOfField.length;
        int j = 0;
        while (true)
        {
          if (j >= i)
          {
            i = 1;
            break;
          }
          Field localField = arrayOfField[j];
          Object localObject1 = localField.get(paramObject2);
          Object localObject2 = localField.get(paramObject1);
          boolean bool = localObject1.equals(localObject2);
          if (!bool)
          {
            i = 0;
            break;
          }
          j += 1;
        }
      }
      catch (IllegalArgumentException localIllegalArgumentException)
      {
        i = 0;
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        i = 0;
      }
    }
  }

  public static String toObjectString(Object paramObject)
  {
    Field[] arrayOfField = paramObject.getClass().getFields();
    StringBuilder localStringBuilder1 = new StringBuilder(10);
    int i = 1;
    try
    {
      int j = arrayOfField.length;
      int k = 0;
      if (k >= j)
        return localStringBuilder1.toString();
      Field localField = arrayOfField[k];
      if (i != 0)
        i = 0;
      while (true)
      {
        StringBuilder localStringBuilder2 = localStringBuilder1.append(">>>>>");
        String str = localField.getName();
        StringBuilder localStringBuilder3 = localStringBuilder2.append(str).append(":");
        Object localObject = localField.get(paramObject);
        StringBuilder localStringBuilder4 = localStringBuilder3.append(localObject);
        k += 1;
        break;
        StringBuilder localStringBuilder5 = localStringBuilder1.append("\n");
      }
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      while (true)
        LogUtils.e(localIllegalArgumentException);
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      while (true)
        LogUtils.e(localIllegalAccessException);
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.ObjectUtil
 * JD-Core Version:    0.6.0
 */